import 'package:fluro/fluro.dart';
import 'package:mi_mang_flutter/page/login/login_page.dart';
import 'package:mi_mang_flutter/page/login/register_page.dart';
import 'package:mi_mang_flutter/routers/router_init.dart';

import 'forget_password_page.dart';

class LoginRouter implements IRouterProvider {
  /// 登录页面
  static String login = "/login";

  /// 注册
  static String register = "/login/register";

  /// 忘记密码
  static String forgetPassword = "/login/forgetPassword";

  @override
  void initRouter(FluroRouter router) {
    router.define(
      login,
      handler: Handler(handlerFunc: (_, params) => LoginPage()),
    );

    /// 找回密码
    router.define(
      register,
      handler: Handler(handlerFunc: (_, params) => RegisterPage()),
    );

    /// 找回密码
    router.define(
      forgetPassword,
      handler: Handler(handlerFunc: (_, params) => ForgetPasswordPage()),
    );
  }
}
